package com.example.doctorsystem.service.impl;

import com.example.doctorsystem.dao.AnnouncementDao;
import com.example.doctorsystem.model.Announcement;
import com.example.doctorsystem.service.AnnouncementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AnnouncementServiceImpl implements AnnouncementService {

    @Autowired
    private AnnouncementDao announcementDao;

    @Override
    public int addAnnouncement(Announcement announcement) {
        return announcementDao.addAnnouncement(announcement);
    }

    @Override
    public List<Announcement> getAllAnnouncements() {
        return announcementDao.getAllAnnouncements();
    }

    @Override
    public int deleteAnnouncementById(int id) {
        return announcementDao.deleteAnnouncementById(id);
    }
}
